package com.ios.dao;

import com.ios.entity.DisablerUser;
import com.ios.entity.RelativeUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RelativeUserMapper {

    /**
    *@Author:WenTao
    *@Description:监护人注册
    *@Date:15:44 2018/7/17
    */
    int insertSelective(RelativeUser record);

    /**
    *@Author:WenTao
    *@Description:监护人信息更新
    *@Date:15:45 2018/7/18
    */
    int updateByPrimaryKeySelective(RelativeUser record);

    /**
    *@Author:WenTao
    *@Description:根据用户名插入图片地址
    *@Date:16:22 2018/7/17
    */
    int updateHeadImg(@Param("headImage") String headImage, @Param("username")String username);

    /**
    *@Author:WenTao
    *@Description:获取所有监护人电话
    *@Date:15:57 2018/7/17
    */
    List<String> getAllPhone();

    /**
    *@Author:WenTao
    *@Description:获取所有监护人用户名
    *@Date:15:57 2018/7/17
    */
    List<String> getAllUsername();

    /**
    *@Author:WenTao
    *@Description:监护人登录
    *@Date:22:54 2018/7/17
    */
    RelativeUser selectByUsername(String username);

    /**
    *@Author:WenTao
    *@Description:  根据用户名查询
    *@Date:8:37 2018/7/18
    */
    RelativeUser queryByUsername(String username);

    /**
    *@Author:WenTao
    *@Description:根据被监护人id查询监护人信息
    *@Date:9:30 2018/7/21
    */
    RelativeUser queryByDisabler(int disabler_id);

    /**
    *@Author:WenTao
    *@Description:查询所有监护人id
    *@Date:9:29 2018/7/23
    */
    List<Integer> queryAllId();
}